package ar.com.equis.flexjavaintegration.administracion;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Cascade;

import ar.com.equis.flexjavaintegration.persistencia.UuidObjetoNegocioPersistente;

public class Proyecto extends UuidObjetoNegocioPersistente {

	private static final long serialVersionUID = 1L;
	
	@ManyToMany(cascade=CascadeType.MERGE,targetEntity=Recurso.class)
	private List<Recurso> recursos;
	
	@OneToMany
	@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
	@JoinColumn(name="SPRINT_ID")
	private List<Sprint> sprints;
	
	public List<Recurso> getRecursos() {
		return recursos;
	}
	public void setRecursos(List<Recurso> recursos) {
		this.recursos = recursos;
	}
	public List<Sprint> getSprints() {
		return sprints;
	}
	public void setSprints(List<Sprint> sprints) {
		this.sprints = sprints;
	}
	
	
}
